<template>
    <el-tooltip :placement="position">
        <template #content>
            {{ content }}
        </template>
        <slot></slot>
    </el-tooltip>
</template>

<script setup lang="ts">
// 接口
interface ContentProps {
    // 内容
    content: string,
    // 显示位置
    position: string
}
// 接受父组件参数，配置默认值
const props = withDefaults(defineProps<ContentProps>(), {
    content: '',
    position: 'top'
})

const { content, position } = props;
</script>

<style scoped lang="scss">
</style>